import request from '@/utils/request'

// 获取组织架构数据
export const getDepartment=()=>{
  return request.get('/company/department')
}

// 获取部门负责人数据
export const getManagerList=()=>{
  return request.get('/sys/user/simple')
}

// 新增部门数据
export const addDepartment=(data)=>{
  return request.post('/company/department',data)
}

// 获取部门详情数据
export const getDepartmentDetails=(id)=>{
  return request.get(`/company/department/${id}`)
}

// 更新（编辑）部门详情数据
export const updateDepartment=(data)=>{
  return request.put(`/company/department/${data.id}`,data)
}
// 删除部门
export const deleteDepartment=(id)=>{
  return request.delete(`/company/department/${id}`)
}
